package com.eastfair.venueservice.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.eastfair.annotation.model.EchoVO;
import com.eastfair.core.base.entity.Entity;
import com.eastfair.database.mybatis.typehandler.M9EncryptHandler;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;

/**
 * 智慧物流服务-装卸服务
 *
 * @author Du Xiaobo
 * @date 2023/5/8 15:09
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName(value="vsm_logistics_load",autoResultMap = true)
@ApiModel(value = "LoadInfo", description = "智慧物流服务-装卸服务")
@AllArgsConstructor
public class LoadInfo extends Entity<Long> implements EchoVO {

    private static final long serialVersionUID = -7332389950045334489L;
    @TableField(exist = false)
    private Map<String, Object> echoMap = new HashMap<>();

    /**
     * 是否启用（确认状态）：1是 已确认；0否 未确认
     */
    @ApiModelProperty(value = "是否启用（确认状态）：1是 已确认；0否 未确认")
    @TableField(value = "is_enabled")
    @Excel(name = "是否启用（确认状态）：1是 已确认；0否 未确认")
    private Integer isEnabled;

    /**
     * 是否删除：1是；0否
     */
    @ApiModelProperty(value = "是否删除：1是；0否")
    @TableField(value = "is_deleted")
    @Excel(name = "是否删除：1是；0否")
    private Integer isDeleted;

    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    @TableField(value = "project_id")
    @Excel(name = "项目id")
    private Long projectId;

    /**
     * 子系统id
     */
    @ApiModelProperty(value = "子系统id")
    @TableField(value = "subsystem_id")
    @Excel(name = "子系统id")
    private Long subsystemId;

    /**
     * 租户id
     */
    @ApiModelProperty(value = "租户id")
    @TableField(value = "tenant_id")
    @Excel(name = "租户id")
    private Long tenantId;


    /**
     * 主体类型
     */
    @ApiModelProperty(value = "主体类型")
    @TableField(value = "principal_type")
    @Excel(name = "主体类型")
    private String principalType;

    /**
     * 企业名称
     */
    @ApiModelProperty(value = "企业名称")
    @TableField(value = "enterprise_name")
    @Excel(name = "企业名称")
    private String enterpriseName;

    /**
     * 社会统一代码
     */
    @ApiModelProperty(value = "社会统一代码")
    @TableField(value = "social_unified_code")
    @Excel(name = "社会统一代码")
    private String socialUnifiedCode;

    /**
     * 展会id
     */
    @ApiModelProperty(value = "展会id")
    @TableField(value = "exhibition_id")
    @Excel(name = "展会id")
    private Long exhibitionId;

    /**
     * 展会名称
     */
    @ApiModelProperty(value = "展会名称")
    @TableField(value = "exhibition_name")
    @Excel(name = "展会名称")
    private String exhibitionName;

    /**
     * 展厅号
     */
    @ApiModelProperty(value = "展厅号")
    @TableField(value = "exhibition_hall_no")
    @Excel(name = "展厅号")
    private String exhibitionHallNo;

    /**
     * 展位号
     */
    @ApiModelProperty(value = "展位号")
    @TableField(value = "booth_no")
    @Excel(name = "展位号")
    private String boothNo;

    /**
     * 联系人
     */
    @ApiModelProperty(value = "联系人")
    @TableField(value = "contact")
    @Excel(name = "联系人")
    private String contact;

    /**
     * 联系方式
     */
    @ApiModelProperty(value = "联系方式")
    @TableField(value = "telephone",typeHandler = M9EncryptHandler.class)
    @Excel(name = "联系方式")
    private String telephone;

    /**
     * 服务内容
     */
    @ApiModelProperty(value = "服务内容")
    @TableField(value = "service_content")
    @Excel(name = "服务内容")
    private String serviceContent;

    /**
     * 服务数量
     */
    @ApiModelProperty(value = "服务数量")
    @TableField(value = "service_number")
    @Excel(name = "服务数量")
    private Integer serviceNumber;

    /**
     * 实际服务数量
     */
    @ApiModelProperty(value = "实际服务数量")
    @TableField(value = "actual_service_number")
    @Excel(name = "实际服务数量")
    private Integer actualServiceNumber;

    /**
     * 计费单价
     */
    @ApiModelProperty(value = "计费单价")
    @TableField(value = "service_price")
    @Excel(name = "计费单价")
    private BigDecimal servicePrice;

    /**
     * 计费单位
     */
    @ApiModelProperty(value = "计费单位")
    @TableField(value = "service_unit")
    @Excel(name = "计费单位")
    private BigDecimal serviceUnit;

    /**
     * 租赁内容
     */
    @ApiModelProperty(value = "租赁内容")
    @TableField(value = "lease_content")
    @Excel(name = "租赁内容")
    private String leaseContent;

    /**
     * 租赁数量
     */
    @ApiModelProperty(value = "租赁数量")
    @TableField(value = "lease_number")
    @Excel(name = "租赁数量")
    private Integer leaseNumber;

    /**
     * 实际用时
     */
    @ApiModelProperty(value = "实际用时")
    @TableField(value = "actual_lease_number")
    @Excel(name = "实际用时")
    private Integer actualLeaseNumber;

    /**
     * 租赁单价
     */
    @ApiModelProperty(value = "租赁单价")
    @TableField(value = "lease_price")
    @Excel(name = "租赁单价")
    private BigDecimal leasePrice;

    /**
     * 租赁单位
     */
    @ApiModelProperty(value = "租赁单位")
    @TableField(value = "lease_unit")
    @Excel(name = "租赁单位")
    private BigDecimal leaseUnit;

    /**
     * 预计货物总体积
     */
    @ApiModelProperty(value = "预计货物总体积")
    @TableField(value = "estimate_volume")
    @Excel(name = "预计货物总体积")
    private BigDecimal estimateVolume;

    /**
     * 实际货物总体积
     */
    @ApiModelProperty(value = "实际货物总体积")
    @TableField(value = "actual_volume")
    @Excel(name = "实际货物总体积")
    private BigDecimal actualVolume;

    /**
     * 预计计费总价
     */
    @ApiModelProperty(value = "预计计费总价")
    @TableField(value = "estimated_service_cost")
    @Excel(name = "预计计费总价")
    private BigDecimal estimatedServiceCost;

    /**
     * 实际计费总价
     */
    @ApiModelProperty(value = "实际计费总价")
    @TableField(value = "actual_service_cost")
    @Excel(name = "实际计费总价")
    private BigDecimal actualServiceCost;

    /**
     * 预计租赁计时总价
     */
    @ApiModelProperty(value = "预计租赁计时总价")
    @TableField(value = "estimated_lease_cost")
    @Excel(name = "预计租赁计时总价")
    private BigDecimal estimatedLeaseCost;

    /**
     * 实际租赁计时总价
     */
    @ApiModelProperty(value = "实际租赁计时总价")
    @TableField(value = "actual_lease_cost")
    @Excel(name = "实际租赁计时总价")
    private BigDecimal actualLeaseCost;

    /**
     * 提交时间
     */
    @ApiModelProperty(value = "提交时间")
    @TableField(value = "submit_time")
    @Excel(name = "提交时间")
    private LocalDateTime submitTime;

    /**
     * 审核时间
     */
    @ApiModelProperty(value = "审核时间")
    @TableField(value = "examine_time")
    @Excel(name = "审核时间")
    private LocalDateTime examineTime;

    /**
     * 审核状态
     */
    @ApiModelProperty(value = "审核状态")
    @TableField(value = "examine_state")
    @Excel(name = "审核状态")
    private String examineState;

    /**
     * 审核理由
     */
    @ApiModelProperty(value = "审核理由")
    @TableField(value = "examine_reason")
    @Excel(name = "审核理由")
    private String examineReason;

    @Builder

    public LoadInfo(Long id, LocalDateTime createTime, Long createdBy, LocalDateTime updateTime, Long updatedBy, Integer isEnabled, Integer isDeleted, Long projectId, Long subsystemId, Long tenantId, String principalType, String enterpriseName, String socialUnifiedCode, Long exhibitionId, String exhibitionName, String exhibitionHallNo, String boothNo, String contact, String telephone, String serviceContent, Integer serviceNumber, Integer actualServiceNumber, BigDecimal servicePrice, BigDecimal serviceUnit, String leaseContent, Integer leaseNumber, Integer actualLeaseNumber, BigDecimal leasePrice, BigDecimal leaseUnit, BigDecimal estimateVolume, BigDecimal actualVolume, BigDecimal estimatedServiceCost, BigDecimal actualServiceCost, BigDecimal estimatedLeaseCost, BigDecimal actualLeaseCost, LocalDateTime submitTime, LocalDateTime examineTime, String examineState, String examineReason) {
        this.id = id;
        this.createdBy = createdBy;
        this.createTime = createTime;
        this.updatedBy = updatedBy;
        this.updateTime = updateTime;
        this.isEnabled = isEnabled;
        this.isDeleted = isDeleted;
        this.projectId = projectId;
        this.subsystemId = subsystemId;
        this.tenantId = tenantId;
        this.principalType = principalType;
        this.enterpriseName = enterpriseName;
        this.socialUnifiedCode = socialUnifiedCode;
        this.exhibitionId = exhibitionId;
        this.exhibitionName = exhibitionName;
        this.exhibitionHallNo = exhibitionHallNo;
        this.boothNo = boothNo;
        this.contact = contact;
        this.telephone = telephone;
        this.serviceContent = serviceContent;
        this.serviceNumber = serviceNumber;
        this.actualServiceNumber = actualServiceNumber;
        this.servicePrice = servicePrice;
        this.serviceUnit = serviceUnit;
        this.leaseContent = leaseContent;
        this.leaseNumber = leaseNumber;
        this.actualLeaseNumber = actualLeaseNumber;
        this.leasePrice = leasePrice;
        this.leaseUnit = leaseUnit;
        this.estimateVolume = estimateVolume;
        this.actualVolume = actualVolume;
        this.estimatedServiceCost = estimatedServiceCost;
        this.actualServiceCost = actualServiceCost;
        this.estimatedLeaseCost = estimatedLeaseCost;
        this.actualLeaseCost = actualLeaseCost;
        this.submitTime = submitTime;
        this.examineTime = examineTime;
        this.examineState = examineState;
        this.examineReason = examineReason;
    }
}
